import {baseRequest} from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/license/` + url, ...arg)


export default {
	async fetchList(query) {
		return await request('page', query, 'get')
	},
	async licenseList() {
		return await request('list', {}, 'post')
	}
	,
	async licenseAuthList() {
		return await request('auth-list', {}, 'post')
	}
	,
	async createLicense(data) {
		return await request('create', data, 'post')
	}
	,
	async updateLicense(data) {
		return await request('update', data, 'post')
	}
	,
	async updateEnableStatus(id, enable) {
		return await request('update/enable-status', {
			id: id,
			enable: enable
		}, 'post')
	}
	,
	async deleteLicense(id) {
		return await request('delete', {
			id: id
		}, 'post')
	}
	,
	async resetLicense(id) {
		return await request('reset', {
			id: id
		}, 'post')
	}
}


